function Person(name){
    this.name = name
}

let p1 = new Person('张三')
console.log("p1",p1);

/**
 * 使用 class 关键字定义 类型
 */
class Student{
    // name = '';
    // age = 0;


    //构造器不能有多个
    //构造器
    constructor(name , age = 0 ){
        this.name = name;
        this.age = age
    }


}


let stu1 = new Student("关云长",50);
let stu2 = new Student("赵云",48);
let stu3 = new Student("刘备");
console.log("stu1",stu1);
console.log("stu2",stu2);
console.log("stu3",stu3);
